<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/message.css"/>
    <link rel="stylesheet" href="/css/like.css"/>
    <script src="../js/plugins/jrender/jrender.min.js"></script>
    <script src="../js/plugins/dialog2/dialog.min.js"></script>
    <link rel="stylesheet" href="../js/plugins/dialog2/dialog.css">

</head>
<script>
    $(function () {
        var users = sessionStorage.getItem("user");
        var user = JSON.parse(users);

        /*$.get("/users/" + user.id + "/travels/travelconcerns", {pageSize: 0}, function (data) {
            $(".detail").renderValues(data);
        })*/
        function query() {
            $.get("/users/" + user.id + "/travels/travelconcerns", {pageSize: 0}, function (data) {
                $(".detail").renderValues(data,{
                    'setHref':function (item,value) {
                        $(item).attr("href", $(item).attr("href") + value);
                    },
                    setUserId: function (ele, val) {
                        $(ele).attr("href", $(ele).attr("href") + val);
                    }
                });
                currentPage += 1;
                totalPage = data.pages;
            })
        }

        query();
        var currentPage;
        var dataList = [];
        var totalPage = 1;
        $(window).scroll(function () {
            if ($(window).height() + $(window).scrollTop() >= $(document).height()) {
                if (currentPage <= totalPage) {
                    query();
                } else {
                    $(document).dialog({
                        type: 'notice',
                        infoText: '到底了',
                        autoClose: 1500,
                        position: 'bottom'
                    })
                }
            }
        });
    })

</script>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <span>点赞我的人</span>
        </div>
        <div class="col"></div>
    </div>
</div>

<ul class="nav nav-pills nav-justified border border-left-0 border-top-0 border-right-0" id="pills-tab" role="tablist">
    <li class="nav-item">
        <a class="nav-link active show" id="pills-top-travel" data-toggle="pill" href="#pills-travel">
            <span style="font-weight: bold;color: cyan">游记点赞</span>
        </a>
    </li>
    <li class="nav-item">
        <a class="nav-link " id="pills-top-" data-toggle="pill" href="#pills-top">
            <span style="font-weight: bold;color: cyan">动态点赞</span>
        </a>
    </li>
</ul>

<div class="tab-content" id="pills-tabContent">
    <div class="tab-pane fade active show" id="pills-travel">
        <div class="container">
            <div>
                <div class="row detail">
                    <div class="col" render-loop="list">
                        <div>
                            <a href="../userProfiles.html?id=" render-fun="setUserId" render-key="list.liker.id">
                                <img render-src="list.liker.headImgUrl" class="rounded-circle head-img"/>
                                <span render-html="list.liker.nickName" style="color: blueviolet"></span> </a>在
                            <p/>
                            <span render-html="list.likeDate" style="color: chartreuse"></span>
                            对您的
                            <p/>
                            <a href="../travelContent.html?id=" render-fun="setHref" render-key="list.travel.id">
                            <span render-html="list.travel.title" style="color: crimson"></span></a>
                            <div class="focus">
                                <i class="fa fa-thumbs-up">点赞</i>
                            </div>
                            <hr/>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="tab-pane fade" id="pills-top">
        <div class="container">
            <div>
                <div class="row ">
                    <div class="col">
                        <div>
                            <a data-href="userProfiles.html">
                                <img render-src="list.liker.headImgUrl" class="rounded-circle head-img"/>
                                <span render-html="list.liker.nickName" style="color: blueviolet">sss</span> </a>在
                            <p/>
                            <span render-html="list.likeDate" style="color: chartreuse">sss</span>
                            对您的
                            <p/>
                            <span render-html="list.travel.title" style="color: crimson">sss</span>
                            <div class="focus">
                                <i class="fa fa-thumbs-up">点赞</i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>